package com.yuexunit.finance.project.service;

import com.yuexunit.finance.project.FinanceQRCodeService;
import com.yuexunit.finance.project.entity.FinanceQRCodeEntity;
import com.yuexunit.inject.annotation.Implements;
import com.yuexunit.persist.PersistUtil;
import com.yuexunit.persist.annotation.Transactional;

/**
*@version 创建时间：2016年11月22日 下午6:10:53
*@author wenwenlong
*类说明
*/

@Implements(FinanceQRCodeService.class)
public class FinanceQRCodeServiceImpl implements FinanceQRCodeService {

	@Override
	@Transactional
	public void createFinanceQRCode(FinanceQRCodeEntity entity) {
		PersistUtil.insert(entity);
	}

	@Override
	@Transactional
	public void updateFinanceQECode(FinanceQRCodeEntity entity) {
		PersistUtil.update(entity);
	}

	@Override
	public FinanceQRCodeEntity inquireFinanceQRCode(String randomCode) {
		return PersistUtil.get(FinanceQRCodeEntity.class, randomCode);
	}

	@Override
	@Transactional
	public void deleteFinanceQRCode(String randomCode) {
		PersistUtil.delete(FinanceQRCodeEntity.class, randomCode);
	}
}
